<?php
/**
 * 美财大学
 *
 * @copyright  Copyright (c) 2007-2013 ShopNC Inc. (http://www.shopnc.net)
 * @license    http://www.shopnc.net
 * @link       http://www.shopnc.net
 * @since      File available since Release v1.1
 */
defined('InShopNC') or exit('Access Invalid!');

class university_indexControl extends MobileControl
{
    private $voucherstate_arr;

    public function __construct()
    {
        parent::__construct();
        $this->isLogin();
    }

    //美财大学首页展示
    public function indexOp()
    {
        $title = trim($_POST['title']);
        $sql_hot = "SELECT * FROM #__study as s   LEFT JOIN #__study_category as sc ON s.study_cat_id=sc.study_cat_id  where  sc.study_cat_name = '热门' ORDER BY rand()";
        $sql_manage = "SELECT * FROM #__study as s   LEFT JOIN #__study_category as sc ON s.study_cat_id=sc.study_cat_id  where  sc.study_cat_name = '管理' ORDER BY rand()";
        $sql_technology = "SELECT * FROM #__study as s   LEFT JOIN #__study_category as sc ON s.study_cat_id=sc.study_cat_id  where  sc.study_cat_name = '技术' ORDER BY rand()";
        $sql_marketing = "SELECT * FROM #__study as s   LEFT JOIN #__study_category as sc ON s.study_cat_id=sc.study_cat_id  where  sc.study_cat_name = '营销' ORDER BY rand()";
        $sql_shopping = "SELECT * FROM #__study as s   LEFT JOIN #__study_category as sc ON s.study_cat_id=sc.study_cat_id  where  sc.study_cat_name = '美财购物' ORDER BY rand()";
		$sql_wealth = "SELECT * FROM #__study as s   LEFT JOIN #__study_category as sc ON s.study_cat_id=sc.study_cat_id  where  sc.study_cat_name = '财富' ORDER BY rand()";
		$sql_work = "SELECT * FROM #__study as s   LEFT JOIN #__study_category as sc ON s.study_cat_id=sc.study_cat_id  where  sc.study_cat_name = '作品' ORDER BY rand()";
		//师资力量
		$sql_teacher = "select * from #__study_teacher";
        $pagesize = 2;
        $rs_hot = db::pageQuery($sql_hot, $curpage, $pagesize);
        $rs_manage = db::pageQuery($sql_manage, $curpage, $pagesize);
        $rs_technology = db::pageQuery($sql_technology, $curpage, $pagesize);
        $rs_marketing = db::pageQuery($sql_marketing, $curpage, $pagesize);
        $rs_shopping = db::pageQuery($sql_shopping, $curpage, $pagesize);
		$rs_wealth = db::pageQuery($sql_wealth, $curpage, $pagesize);
		$rs_work = db::pageQuery($sql_work, $curpage, $pagesize);
		$rs_teacher = db::pageQuery($sql_teacher, $curpage, $pagesize);
        $university_list_hot = $rs_hot->fetchAll();
        $university_list_manage = $rs_manage->fetchAll();
        $university_list_technology = $rs_technology->fetchAll();
        $university_list_marketing = $rs_marketing->fetchAll();
        $university_list_shopping = $rs_shopping->fetchAll();
		$university_list_wealth = $rs_wealth->fetchAll();
		$university_list_work = $rs_work->fetchAll();
		$university_list_teacher = $rs_teacher->fetchAll();
        $page = new Page();
        $page->setEachNum($pagesize);
        $page->setNowPage($curpage);
        $page->setTotalNum($rs_hot->pageRows());
        $page->setStyle('admin');
        Tpl::output('university_list_hot', $university_list_hot);
        Tpl::output('university_list_manage', $university_list_manage);
        Tpl::output('university_list_technology', $university_list_technology);
        Tpl::output('university_list_marketing', $university_list_marketing);
        Tpl::output('university_list_shopping', $university_list_shopping);
		Tpl::output('university_list_wealth', $university_list_wealth);
		Tpl::output('university_list_work', $university_list_work);
		Tpl::output('university_list_teacher', $university_list_teacher);
        Tpl::output('title', $title);
        Tpl::showPage('u_index');
    }

    //管理类课程排序
    public function u_list_gl_sortOp()
    {
        $page = new Page();
        $page->setEachNum(8);
        $page->setStyle('admin');
        // 得到排序方式
        if (!empty ($_GET ['key'])) {
            $order_tmp = trim($_GET ['key']);
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $temp = 0;
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('管理') . "' ";
                    break;
                case 'free' : // 免费
                    $temp = 0;
                    $order = "study_price";
                    $where = "where study_price = '0' and study_points = '0' and study_cat_id = '" . universityModel::study_cat_name('管理') . "'";
                    $case = "study_free";
                    break;
                case 'study' : // 学习
                    $temp = 1;
                    $order = 'count(study_log.study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('管理') . "' GROUP BY study.study_id ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('管理') . "'";
                    $case = "lesson_study";
                    break;
                case 'study_price' : // 价格排序
                    $temp = 0;
                    $order = 'study_price';
                    $where = "where study_cat_id = '" . universityModel::study_cat_name('管理') . "'";
                    $case = "study_price_sort";
                    break;
                case 'collection' : // 收藏
                    $temp = 1;
                    $order = 'count(study_collection.collection_study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('管理') . "' GROUP BY study.study_id ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('管理') . "'";
                    $case = "lesson_collection";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        } else {
            $order_tmp = 'default';
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('管理') . "' ";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);

        }
        $model_studys = new universityModel();
        //课程列表
        $fieldstr = "study_id,study_cat_id,study_price,title,study_photo";
        $param['order'] = $order;
        $lesson_list = $model_studys->getStudys($param, $page, $fieldstr, $case, $extend, $where);
        Tpl::output('lesson_list', $lesson_list);
        if ($temp == 1) {
            $pageSize = 8;
            $curPage = $_GET['curpage'];
            $rs = Db::PageQuery($sql, $curPage, $pageSize);
            $page = new page();
            $page->setEachNum($pageSize);
            $page->setNowPage($curPage);
            $page->setTotalNum($rs->pageRows());
            $page->setStyle('admin');
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_gl');
        } else {
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_gl');

        }
    }

    //技术类课程排序
    public function u_list_js_sortOp()
    {
        $page = new Page();
        $page->setEachNum(8);
        $page->setStyle('admin');
        // 得到排序方式
        if (!empty ($_GET ['key'])) {
            $order_tmp = trim($_GET ['key']);
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $temp = 0;
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('技术') . "' ";
                    $temp = 0;
                    break;
                case 'free' : // 免费
                    $temp = 0;
                    $order = "study_price";
                    $where = "where study_price = '0' and study_points = '0' and study_cat_id = '" . universityModel::study_cat_name('技术') . "'";
                    $case = "study_free";

                    break;
                case 'study' : // 学习
                    $temp = 1;
                    $order = 'count(study_log.study_id)';
                    $where = "where study.study_cat_id ='" . universityModel::study_cat_name('技术') . "' GROUP BY study.study_id  ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('技术') . "'";
                    $case = "lesson_study";
                    break;
                case 'study_price' : // 价格排序
                    $temp = 0;
                    $order = 'study_price';
                    $where = "where study_cat_id = '" . universityModel::study_cat_name('技术') . "'";
                    $case = "study_price_sort";

                    break;
                case 'collection' : // 收藏
                    $temp = 1;
                    $order = 'count(study_collection.collection_study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('技术') . "' GROUP BY study.study_id ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('技术') . "'";
                    $case = "lesson_collection";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        } else {
            $order_tmp = 'default';
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('技术') . "' ";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        }
        $model_studys = new universityModel();
        //课程列表
        $fieldstr = "study_id,study_cat_id,study_price,title,study_photo";
        $param['order'] = $order;
        $lesson_list = $model_studys->getStudys($param, $page, $fieldstr, $case, $extend, $where);
        Tpl::output('lesson_list', $lesson_list);
        if ($temp == 1) {
            $pageSize = 8;
            $curPage = $_GET['curpage'];
            $rs = Db::PageQuery($sql, $curPage, $pageSize);
            $page = new page();
            $page->setEachNum($pageSize);
            $page->setNowPage($curPage);
            $page->setTotalNum($rs->pageRows());
            $page->setStyle('admin');
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_js');
        } else {
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_js');

        }


    }

    //营销类课程排序
    public function u_list_yx_sortOp()
    {
        $page = new Page();
        $page->setEachNum(8);
        $page->setStyle('admin');
        // 得到排序方式
        if (!empty ($_GET ['key'])) {
            $order_tmp = trim($_GET ['key']);
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $temp = 0;
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('营销') . "' ";
                    break;
                case 'free' : // 免费
                    $temp = 0;
                    $order = "study_price";
                    $where = "where study_price = '0' and study_points = '0' and study_cat_id = '" . universityModel::study_cat_name('营销') . "'";
                    $case = "study_free";
                    break;
                case 'study' : // 学习
                    $temp = 1;
                    $order = 'count(study_log.study_id)';
                    $where = "where study.study_cat_id ='" . universityModel::study_cat_name('营销') . "' GROUP BY study.study_id  ";
                    $case = "lesson_study";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('营销') . "'";
                    break;
                case 'study_price' : // 价格排序
                    $temp = 0;
                    $order = 'study_price';
                    $where = "where study_cat_id = '" . universityModel::study_cat_name('营销') . "'";
                    $case = "study_price_sort";
                    break;
                case 'collection' : // 收藏
                    $temp = 1;
                    $order = 'count(study_collection.collection_study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('营销') . "' GROUP BY study.study_id ";
                    $case = "lesson_collection";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('营销') . "'";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        } else {
            $order_tmp = 'default';
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('营销') . "' ";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        }
        $model_studys = new universityModel();
        //课程列表
        $fieldstr = "study_id,study_cat_id,study_price,title,study_photo";
        $param['order'] = $order;
        $lesson_list = $model_studys->getStudys($param, $page, $fieldstr, $case, $extend, $where);
        Tpl::output('lesson_list', $lesson_list);
        if ($temp == 1) {
            $pageSize = 8;
            $curPage = $_GET['curpage'];
            $rs = Db::PageQuery($sql, $curPage, $pageSize);
            $page = new page();
            $page->setEachNum($pageSize);
            $page->setNowPage($curPage);
            $page->setTotalNum($rs->pageRows());
            $page->setStyle('admin');
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_yx');
        } else {
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_yx');

        }
    }

    //美财购物类排序
    public function u_list_gw_sortOp()
    {
        $page = new Page();
        $page->setEachNum(8);
        $page->setStyle('admin');

        // 得到排序方式
        if (!empty ($_GET ['key'])) {
            $order_tmp = trim($_GET ['key']);
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $temp = 0;
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('美财购物') . "' ";
                    break;
                case 'free' : // 免费
                    $temp = 0;
                    $order = "study_price";
                    $where = "where study_price = '0' and study_points = '0' and study_cat_id = '" . universityModel::study_cat_name('美财购物') . "'";
                    $case = "study_free";
                    break;
                case 'study' : // 学习
                    $temp = 1;
                    $order = 'count(study_log.study_id)';
                    $where = "where study.study_cat_id ='" . universityModel::study_cat_name('美财购物') . "' GROUP BY study.study_id  ";
                    $case = "lesson_study";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('美财购物') . "'";
                    break;
                case 'study_price' : // 价格排序
                    $temp = 0;
                    $order = 'study_price';
                    $where = "where study_cat_id = '" . universityModel::study_cat_name('美财购物') . "'";
                    $case = "study_price_sort";
                    break;
                case 'collection' : // 收藏
                    $temp = 1;
                    $order = 'count(study_collection.collection_study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('美财购物') . "'  GROUP BY study.study_id ";
                    $case = "lesson_collection";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('美财购物') . "'";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        } else {
            $order_tmp = 'default';
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('美财购物') . "' ";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        }
        $model_studys = new universityModel();
        //课程列表
        $fieldstr = "study.study_id,study.study_cat_id,study.study_points,study.vedio_url,study.study_price,study.title,study.study_photo";
        $param['order'] = $order;


        $lesson_list = $model_studys->getStudys($param, $page, $fieldstr, $case, $extend, $where);
        Tpl::output('lesson_list', $lesson_list);
        if ($temp == 1) {
            $pageSize = 8;
            $curPage = $_GET['curpage'];
            $rs = Db::PageQuery($sql, $curPage, $pageSize);
            $page = new page();
            $page->setEachNum($pageSize);
            $page->setNowPage($curPage);
            $page->setTotalNum($rs->pageRows());
            $page->setStyle('admin');
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_gw');
        } else {
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_gw');

        }
    }

    //热门类排序
    public function u_list_rm_sortOp()
    {
        $page = new Page();
        $page->setEachNum(8);
        $page->setStyle('admin');
        // 得到排序方式
        if (!empty ($_GET ['key'])) {
            $order_tmp = trim($_GET ['key']);
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $temp = 0;
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('热门') . "' ";
                    break;
                case 'free' : // 免费
                    $temp = 0;
                    $order = "study_price";
                    $where = "where study_price = '0' and study_points = '0' and study_cat_id = '" . universityModel::study_cat_name('热门') . "'";
                    $case = "study_free";
                    break;
                case 'study' : // 学习
                    $temp = 1;
                    $order = 'count(study_log.study_id)';
                    $where = "where study.study_cat_id ='" . universityModel::study_cat_name('热门') . "' GROUP BY study.study_id  ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('热门') . "'";
                    $case = "lesson_study";
                    break;
                case 'study_price' : // 价格排序
                    $temp = 0;
                    $order = 'study_price';
                    $where = "where study_cat_id = '" . universityModel::study_cat_name('热门') . "'";
                    $case = "study_price_sort";
                    break;
                case 'collection' : // 收藏
                    $temp = 1;
                    $order = 'count(study_collection.collection_study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('热门') . "' GROUP BY study.study_id ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('热门') . "'";
                    $case = "lesson_collection";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        } else {
            $order_tmp = 'default';
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('热门') . "' ";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        }
        $model_studys = new universityModel();
        //课程列表
        $fieldstr = "study_id,study_cat_id,study_photo,study_price,title";
        $param['order'] = $order;
        $lesson_list = $model_studys->getStudys($param, $page, $fieldstr, $case, $extend, $where);
        Tpl::output('lesson_list', $lesson_list);
        if ($temp == 1) {
            $pageSize = 8;
            $curPage = $_GET['curpage'];
            $rs = Db::PageQuery($sql, $curPage, $pageSize);
            $page = new page();
            $page->setEachNum($pageSize);
            $page->setNowPage($curPage);
            $page->setTotalNum($rs->pageRows());
            $page->setStyle('admin');
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_rm');
        } else {
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_rm');
        }
    }

//财富类课程排序
    public function u_list_cf_sortOp()
    {
        $page = new Page();
        $page->setEachNum(8);
        $page->setStyle('admin');
        // 得到排序方式
        if (!empty ($_GET ['key'])) {
            $order_tmp = trim($_GET ['key']);
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $temp = 0;
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('财富') . "' ";
                    break;
                case 'free' : // 免费
                    $temp = 0;
                    $order = "study_price";
                    $where = "where study_price = '0' and study_points = '0' and study_cat_id = '" . universityModel::study_cat_name('财富') . "'";
                    $case = "study_free";
                    break;
                case 'study' : // 学习
                    $temp = 1;
                    $order = 'count(study_log.study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('财富') . "' GROUP BY study.study_id ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('财富') . "'";
                    $case = "lesson_study";
                    break;
                case 'study_price' : // 价格排序
                    $temp = 0;
                    $order = 'study_price';
                    $where = "where study_cat_id = '" . universityModel::study_cat_name('财富') . "'";
                    $case = "study_price_sort";
                    break;
                case 'collection' : // 收藏
                    $temp = 1;
                    $order = 'count(study_collection.collection_study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('财富') . "' GROUP BY study.study_id ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('财富') . "'";
                    $case = "lesson_collection";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        } else {
            $order_tmp = 'default';
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('财富') . "' ";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);

        }
        $model_studys = new universityModel();
        //课程列表
        $fieldstr = "study_id,study_cat_id,study_price,title,study_photo";
        $param['order'] = $order;
        $lesson_list = $model_studys->getStudys($param, $page, $fieldstr, $case, $extend, $where);
        Tpl::output('lesson_list', $lesson_list);
        if ($temp == 1) {
            $pageSize = 8;
            $curPage = $_GET['curpage'];
            $rs = Db::PageQuery($sql, $curPage, $pageSize);
            $page = new page();
            $page->setEachNum($pageSize);
            $page->setNowPage($curPage);
            $page->setTotalNum($rs->pageRows());
            $page->setStyle('admin');
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_cf');
        } else {
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_cf');

        }
    }

//作品类课程排序
    public function u_list_zp_sortOp()
    {
        $page = new Page();
        $page->setEachNum(8);
        $page->setStyle('admin');
        // 得到排序方式
        if (!empty ($_GET ['key'])) {
            $order_tmp = trim($_GET ['key']);
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $temp = 0;
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('作品') . "' ";
                    break;
                case 'free' : // 免费
                    $temp = 0;
                    $order = "study_price";
                    $where = "where study_price = '0' and study_points = '0' and study_cat_id = '" . universityModel::study_cat_name('作品') . "'";
                    $case = "study_free";
                    break;
                case 'study' : // 学习
                    $temp = 1;
                    $order = 'count(study_log.study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('作品') . "' GROUP BY study.study_id ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('作品') . "'";
                    $case = "lesson_study";
                    break;
                case 'study_price' : // 价格排序
                    $temp = 0;
                    $order = 'study_price';
                    $where = "where study_cat_id = '" . universityModel::study_cat_name('作品') . "'";
                    $case = "study_price_sort";
                    break;
                case 'collection' : // 收藏
                    $temp = 1;
                    $order = 'count(study_collection.collection_study_id)';
                    $where = " where study.study_cat_id = '" . universityModel::study_cat_name('作品') . "' GROUP BY study.study_id ";
                    $sql = "select * from #__study where study_cat_id = '" . universityModel::study_cat_name('作品') . "'";
                    $case = "lesson_collection";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);
        } else {
            $order_tmp = 'default';
            $order = '';
            switch ($order_tmp) {
                case 'default' :
                    $order = 'study_id';//默认
                    $where = "where study_cat_id ='" . universityModel::study_cat_name('作品') . "' ";
                    break;
            }
            $order .= ' ' . trim($_GET ['order']);

        }
        $model_studys = new universityModel();
        //课程列表
        $fieldstr = "study_id,study_cat_id,study_price,title,study_photo";
        $param['order'] = $order;
        $lesson_list = $model_studys->getStudys($param, $page, $fieldstr, $case, $extend, $where);
        Tpl::output('lesson_list', $lesson_list);
        if ($temp == 1) {
            $pageSize = 8;
            $curPage = $_GET['curpage'];
            $rs = Db::PageQuery($sql, $curPage, $pageSize);
            $page = new page();
            $page->setEachNum($pageSize);
            $page->setNowPage($curPage);
            $page->setTotalNum($rs->pageRows());
            $page->setStyle('admin');
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_zp');
        } else {
            $this->_assignMobileData($page);
            Tpl::showPage('u_list_zp');

        }
    }

    //搜索课程
    public function Search_stow_goodsOp()
    {

        //查询课程
        $title = trim($_POST['search_shop_id']);
        $sql = "SELECT * FROM #__study where title like '%" . $title . "%'";
        $pageSize = 100;
        $curPage = $_GET['curpage'];
        $rs = Db::PageQuery($sql, $curPage, $pageSize);
        $lesson_list = $rs->fetchAll();
//      $page = new page();
//      $page->setEachNum($pageSize);
//      $page->setNowPage($curPage);
//      $page->setTotalNum($rs->pageRows());
//      $page->setStyle('admin');
//		$this->_assignMobileData($page);
        Tpl::output('search_shop_id', $title);
        Tpl::output("lesson_list", $lesson_list);
        Tpl::output('title', $title);
        Tpl::showpage('u_list_search');
    }

}
